package com.hello.system.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.hello.common.core.annotation.Excel;
import com.hello.common.core.web.domain.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 告警记录对象 alarm_record
 * 
 * @author hello
 * @date 2025-09-09
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class AlarmRecord extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 告警ID */
    private Long alarmId;

    /** 规则ID */
    @Excel(name = "规则ID")
    private Long ruleId;

    /** 告警标题 */
    @Excel(name = "告警标题")
    private String alarmTitle;

    /** 告警消息 */
    @Excel(name = "告警消息")
    private String alarmMessage;

    /** 告警级别 */
    @Excel(name = "告警级别")
    private String alarmLevel;

    /** 告警源(设备编码/系统模块) */
    @Excel(name = "告警源(设备编码/系统模块)")
    private String alarmSource;

    /** 相关设备ID */
    @Excel(name = "相关设备ID")
    private Long deviceId;

    /** 触发值 */
    @Excel(name = "触发值")
    private String triggerValue;

    /** 阈值 */
    @Excel(name = "阈值")
    private String thresholdValue;

    /** 告警状态(unhandled=未处理/handling=处理中/handled=已处理/ignored=已忽略) */
    @Excel(name = "告警状态(unhandled=未处理/handling=处理中/handled=已处理/ignored=已忽略)")
    private String alarmStatus;

    /** 重复告警次数 */
    @Excel(name = "重复告警次数")
    private Long alarmCount;

    /** 首次告警时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "首次告警时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date firstAlarmTime;

    /** 最后告警时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "最后告警时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date lastAlarmTime;

    /** 处理人 */
    @Excel(name = "处理人")
    private String handlePerson;

    /** 处理时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "处理时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date handleTime;

    /** 处理结果 */
    @Excel(name = "处理结果")
    private String handleResult;

    /** 关闭时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "关闭时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date closeTime;

    /** 是否自动关闭(0=否,1=是) */
    @Excel(name = "是否自动关闭(0=否,1=是)")
    private String autoClose;

    public void setAlarmId(Long alarmId) 
    {
        this.alarmId = alarmId;
    }

    public Long getAlarmId() 
    {
        return alarmId;
    }
    public void setRuleId(Long ruleId) 
    {
        this.ruleId = ruleId;
    }

    public Long getRuleId() 
    {
        return ruleId;
    }
    public void setAlarmTitle(String alarmTitle) 
    {
        this.alarmTitle = alarmTitle;
    }

    public String getAlarmTitle() 
    {
        return alarmTitle;
    }
    public void setAlarmMessage(String alarmMessage) 
    {
        this.alarmMessage = alarmMessage;
    }

    public String getAlarmMessage() 
    {
        return alarmMessage;
    }
    public void setAlarmLevel(String alarmLevel) 
    {
        this.alarmLevel = alarmLevel;
    }

    public String getAlarmLevel() 
    {
        return alarmLevel;
    }
    public void setAlarmSource(String alarmSource) 
    {
        this.alarmSource = alarmSource;
    }

    public String getAlarmSource() 
    {
        return alarmSource;
    }
    public void setDeviceId(Long deviceId) 
    {
        this.deviceId = deviceId;
    }

    public Long getDeviceId() 
    {
        return deviceId;
    }
    public void setTriggerValue(String triggerValue) 
    {
        this.triggerValue = triggerValue;
    }

    public String getTriggerValue() 
    {
        return triggerValue;
    }
    public void setThresholdValue(String thresholdValue) 
    {
        this.thresholdValue = thresholdValue;
    }

    public String getThresholdValue() 
    {
        return thresholdValue;
    }
    public void setAlarmStatus(String alarmStatus) 
    {
        this.alarmStatus = alarmStatus;
    }

    public String getAlarmStatus() 
    {
        return alarmStatus;
    }
    public void setAlarmCount(Long alarmCount) 
    {
        this.alarmCount = alarmCount;
    }

    public Long getAlarmCount() 
    {
        return alarmCount;
    }
    public void setFirstAlarmTime(Date firstAlarmTime) 
    {
        this.firstAlarmTime = firstAlarmTime;
    }

    public Date getFirstAlarmTime() 
    {
        return firstAlarmTime;
    }
    public void setLastAlarmTime(Date lastAlarmTime) 
    {
        this.lastAlarmTime = lastAlarmTime;
    }

    public Date getLastAlarmTime() 
    {
        return lastAlarmTime;
    }
    public void setHandlePerson(String handlePerson) 
    {
        this.handlePerson = handlePerson;
    }

    public String getHandlePerson() 
    {
        return handlePerson;
    }
    public void setHandleTime(Date handleTime) 
    {
        this.handleTime = handleTime;
    }

    public Date getHandleTime() 
    {
        return handleTime;
    }
    public void setHandleResult(String handleResult) 
    {
        this.handleResult = handleResult;
    }

    public String getHandleResult() 
    {
        return handleResult;
    }
    public void setCloseTime(Date closeTime) 
    {
        this.closeTime = closeTime;
    }

    public Date getCloseTime() 
    {
        return closeTime;
    }
    public void setAutoClose(String autoClose) 
    {
        this.autoClose = autoClose;
    }

    public String getAutoClose() 
    {
        return autoClose;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("alarmId", getAlarmId())
            .append("ruleId", getRuleId())
            .append("alarmTitle", getAlarmTitle())
            .append("alarmMessage", getAlarmMessage())
            .append("alarmLevel", getAlarmLevel())
            .append("alarmSource", getAlarmSource())
            .append("deviceId", getDeviceId())
            .append("triggerValue", getTriggerValue())
            .append("thresholdValue", getThresholdValue())
            .append("alarmStatus", getAlarmStatus())
            .append("alarmCount", getAlarmCount())
            .append("firstAlarmTime", getFirstAlarmTime())
            .append("lastAlarmTime", getLastAlarmTime())
            .append("handlePerson", getHandlePerson())
            .append("handleTime", getHandleTime())
            .append("handleResult", getHandleResult())
            .append("closeTime", getCloseTime())
            .append("autoClose", getAutoClose())
            .toString();
    }
}
